<%-- 
    Document   : categoriesSideBar
    Created on : Apr 20, 2011, 3:32:18 PM
    Author     : ChuckToh
--%>
<%@page import="NicholasValueBeans.Document"%>
<%
            String category = request.getParameter("category");
            Document d = new Document();
            d.getDocumentIdAndTitlesByCategory(category);
            int[] ids = d.getIds();
            String[] titles = d.getTitles();

            out.println("<table cellspacing='5' cellpadding='5'>");
            for (int i = 0; i < ids.length; i++) {
                out.println("<tr>");
                out.println("<td>");
                out.println("<a href='#content' onclick='loadContent(" + ids[i] + ")'>" + titles[i] + "</a>");
                out.println("</td>");
                out.println("</tr>");
            }
            out.println("</table>");
%>